﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;
using Commons.Data;
namespace Async_await.DAL
{
    /// <summary>
    /// Test数据库的上下文
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public abstract class TestDALBase : DbContextRepositoryBase
    {
        protected static string conn
        {
            get
            {
                if (System.Configuration.ConfigurationManager.ConnectionStrings["testEntities"] == null)
                    throw new ArgumentException("请设置连接串testEntities");
                return System.Configuration.ConfigurationManager.ConnectionStrings["testEntities"].ToString();
            }
        }
        public TestDALBase()
            : base(DbFactory.Intance(conn))
        { }

    }
}